// Table 4. Foreign versus domestic firms
use "eseewithinfirm.dta", clear

local filename "table4"
xi: xtreg lnval i.crisis*longinv8 i.category if domfir==1 , fe cluster(firmid)
outreg2 using "`filename'", word replace label  dec(3)  nocons addtext(Sample, domestic firms) keep(_IcriXlong*)
xi: xtreg lnval i.crisis*longinv8 i.category if domfir==0 , fe cluster(firmid)
outreg2 using "`filename'", word  label  dec(3)  nocons addtext(Sample, foreign firms)  keep(_IcriXlong*)
xi: xtreg lnval i.year*longinv8 i.category if domfir==1 , fe cluster(firmid)
outreg2 using "`filename'", word  label  dec(3)  nocons addtext(Sample, domestic firms) keep(_IyeaXlon*) 
xi: xtreg lnval i.year*longinv8 i.category if domfir==0, fe cluster(firmid)
outreg2 using "`filename'", word  label  dec(3)  nocons addtext(Sample, foreign firms) keep(_IyeaXlon*) 
	